home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / clockp.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  3KB  |  96 lines

  1. /*
  2. * $XConsortium: ClockP.h,v 1.21 90/10/22 14:43:22 converse Exp $
  3. */
  4.  
  5.  
  6. /***********************************************************
  7. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  8. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  9.  
  10.                         All Rights Reserved
  11.  
  12. Permission to use, copy, modify, and distribute this software and its 
  13. documentation for any purpose and without fee is hereby granted, 
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in 
  16. supporting documentation, and that the names of Digital or MIT not be
  17. used in advertising or publicity pertaining to distribution of the
  18. software without specific, written prior permission.  
  19.  
  20. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  21. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  22. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  23. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  25. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  26. SOFTWARE.
  27.  
  28. ******************************************************************/
  29.  
  30. #ifndef _XawClockP_h
  31. #define _XawClockP_h
  32.  
  33. #include <X11/Xos.h>        /* Needed for struct tm. */
  34. #include <X11/Xaw/Clock.h>
  35. #include <X11/Xaw/SimpleP.h>
  36.  
  37. #define SEG_BUFF_SIZE        128
  38. #define ASCII_TIME_BUFLEN    32    /* big enough for 26 plus slop */
  39.  
  40. /* New fields for the clock widget instance record */
  41. typedef struct {
  42.      Pixel    fgpixel;    /* color index for text */
  43.      Pixel    Hipixel;    /* color index for Highlighting */
  44.      Pixel    Hdpixel;    /* color index for hands */
  45.      XFontStruct    *font;    /* font for text */
  46.      GC    myGC;        /* pointer to GraphicsContext */
  47.      GC    EraseGC;    /* eraser GC */
  48.      GC    HandGC;        /* Hand GC */
  49.      GC    HighGC;        /* Highlighting GC */
  50. /* start of graph stuff */
  51.      int    update;        /* update frequence */
  52.      Dimension radius;        /* radius factor */
  53.      int    backing_store;    /* backing store type */
  54.      Boolean chime;
  55.      Boolean beeped;
  56.      Boolean analog;
  57.      Boolean show_second_hand;
  58.      Dimension second_hand_length;
  59.      Dimension minute_hand_length;
  60.      Dimension hour_hand_length;
  61.      Dimension hand_width;
  62.      Dimension second_hand_width;
  63.      Position centerX;
  64.      Position centerY;
  65.      int    numseg;
  66.      int    padding;
  67.      XPoint    segbuff[SEG_BUFF_SIZE];
  68.      XPoint    *segbuffptr;
  69.      XPoint    *hour, *sec;
  70.      struct tm  otm ;
  71.      XtIntervalId interval_id;
  72.      char prev_time_string[ASCII_TIME_BUFLEN];
  73.    } ClockPart;
  74.  
  75. /* Full instance record declaration */
  76. typedef struct _ClockRec {
  77.    CorePart core;
  78.    SimplePart simple;
  79.    ClockPart clock;
  80.    } ClockRec;
  81.  
  82. /* New fields for the Clock widget class record */
  83. typedef struct {int dummy;} ClockClassPart;
  84.  
  85. /* Full class record declaration. */
  86. typedef struct _ClockClassRec {
  87.    CoreClassPart core_class;
  88.    SimpleClassPart simple_class;
  89.    ClockClassPart clock_class;
  90.    } ClockClassRec;
  91.  
  92. /* Class pointer. */
  93. extern ClockClassRec clockClassRec;
  94.  
  95. #endif /* _XawClockP_h */
  96.